<?php
/*
 * @Author: your name
 * @Date: 2020-12-23 12:01:16
 * @LastEditTime: 2020-12-28 10:03:19
 * @LastEditors: Please set LastEditors
 * @Description: 服务器数据库配置控制器
 * @FilePath: /special/application/adminapiv3/controller/platform_manage/ServerDatabasesController.php
 */
namespace app\adminapiv3\controller\platform_manage;


use app\adminapiv3\controller\BaseController;
use app\adminapiv3\model\ServerDatabasesModel;
use think\Request;

class ServerDatabasesController extends BaseController
{
    /**
     * 列表
    */
    public function index(Request $request){
        //搜索参数
        $param = $request->only([
            'source','database','hostname','hostport'
        ],'get');
        $model = new ServerDatabasesModel();
        //根据数据库配置文件,将数据同步入mysql
        $model->refreshMysqlData();
        //查询列表
        $data = $model->getList($param);
        return $this->jsonOutPut($data);
    }

}